package com.huisou.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 资讯信息分类 --------------------- 2011-6-24
 */
@Entity
@Table(name = "tbl_news_category")
public class InfoCategory implements Serializable {
	
	private static final long	serialVersionUID	= 1819492264308088327L;
	
	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer				id;
	
	@Column(name = "parent_id")
	private Integer				parentId;									// 父类别Id
																			
	@Column(name = "code")
	private String				code;
	
	@Column(name = "name")
	private String				name;
	
	@Column(name = "sort")
	private Integer				orderNo;									// 顺序号
																			
	@Column(name = "status")
	private Short				stauts;									// 状态
																			
	@Transient
	private int					dataCount;
	
	public InfoCategory() {
	}
	
	public InfoCategory(Integer id, String name) {
		this.id = id;
		setName(name);
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public Integer getParentId() {
		return parentId;
	}
	
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	
	public Integer getOrderNo() {
		return orderNo;
	}
	
	public void setOrderNo(Integer orderNo) {
		this.orderNo = orderNo;
	}
	
	public int getDataCount() {
		return dataCount;
	}
	
	public void setDataCount(int dataCount) {
		this.dataCount = dataCount;
	}
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public Short getStauts() {
		return stauts;
	}
	
	public void setStauts(Short stauts) {
		this.stauts = stauts;
	}
	
}
